package ch01.text00.tx04;

public class Year {
    public int year;
    public Year(int year) {
        this.year = year;
    }
    // 判断是否为闰年
    public boolean isLeapYear() {
        if ((this.year % 4 == 0 && this.year % 100 != 0) || (this.year % 400 == 0)) {
            return true;
        } else {
            return false;
        }
    }
}
